package tutorial.main.control;



import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;

public class ServiceBuckUp extends Service
{
	@Override
	public IBinder onBind(Intent arg0) {
		System.out.println("---ServiceBuckUp.onBind");
		return mBinder;
	}

	@Override
	public void onCreate() {
		super.onCreate();
		System.out.println("---ServiceBuckUp.oncreate");
	}
	
	
	
	
	@Override
	public void onStart(Intent intent, int startId) {
		super.onStart(intent, startId);
		System.out.println("---ServiceBuckUp.onStart");
		//OperationManager.getInstance().register(
		//		OperationManager.OPERATION_UPDATE_TEMPERATURE, this);

		//_connectivityListener.startListening(this);
		//_connectivityListener.registerHandler(_connectivityHandler,
		//		ACTIVE_SERVICE_ID);
		
	}

	public void endApplication() {
		//_connectivityListener.unregisterHandler(_connectivityHandler);
		System.out.println("---ServiceBuckUp.endApplication");
		//_connectivityListener.stopListening();
		//OperationManager.getInstance().unregister(
		//		OperationManager.OPERATION_UPDATE_TEMPERATURE);
		//NotificationController.cancelAll(this);
		stopSelf();
	}
	
	@Override
	public void onRebind(Intent intent) {
		super.onRebind(intent);
		System.out.println("---ServiceBuckUp.onRebind");
	}
		
	@Override
	public void onDestroy() {
		super.onDestroy();
		System.out.println("---ServiceBuckUp.onDestroy");
	}
	
	@Override
	public boolean onUnbind(Intent intent) {
		System.out.println("---ServiceBuckUp.onUnbind");
		return super.onUnbind(intent);
	}
	
	public boolean guardar()
	{
		
		
		return true;		
	}
	private final IBinder mBinder = new LocalBinder();
	
	public class LocalBinder extends Binder {
	public ServiceBuckUp getService() {
		return ServiceBuckUp.this;
	}
}
}


